package com.visense.smart.pharm.pa.service.init;



public class PAAccessModule
{
	/*public static DBAccessBase KLIBAccess = new DBAccessBase();
	public static DBAccessBase ULIBAccess = new DBAccessBase();
	public static DBAccessBase PADBAccess = new DBAccessBase();
	public static DBAccessBase CPWDBAccess = new DBAccessBase();*/

	//public static DBAccessBase KLIBTmpAccess = new DBAccessBase();
	public static void init()
	{
		/*try
		{
			String baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
			DbConnectionStringBuilder builder = null;

			DbHelper dbKLIBHelper = new DbHelper();

			if (ConfigurationManager.ConnectionStrings["KLIB"] != null)
			{
				dbKLIBHelper.Init(ConfigurationManager.ConnectionStrings["KLIB"].ConnectionString);

				builder = dbKLIBHelper.getProviderFactory().CreateConnectionStringBuilder();
				builder.ConnectionString = dbKLIBHelper.getConnectionString();
				builder["Data Source"] = baseDirectory + "app_data\\KLIB";
				dbKLIBHelper.setConnectionString(builder.ConnectionString);
				KLIBAccess.SetDB(dbKLIBHelper);
			}

			DbHelper dbULIBHelper = new DbHelper();

			if (ConfigurationManager.ConnectionStrings["ULIB"] != null)
			{
				dbULIBHelper.Init(ConfigurationManager.ConnectionStrings["ULIB"].ConnectionString);
				builder = dbULIBHelper.getProviderFactory().CreateConnectionStringBuilder();
				builder.ConnectionString = dbULIBHelper.getConnectionString();
				builder["Data Source"] = baseDirectory + "app_data\\ULIB";
				dbULIBHelper.setConnectionString(builder.ConnectionString);
				ULIBAccess.SetDB(dbULIBHelper);
			}

			DbHelper dbPADBHelper = new DbHelper();

			if (ConfigurationManager.ConnectionStrings["PADB"] != null)
			{
				dbPADBHelper.Init(ConfigurationManager.ConnectionStrings["PADB"].ConnectionString);
				PADBAccess.SetDB(dbPADBHelper);
			}

			DbHelper dbCpwHelper = new DbHelper();

			if (ConfigurationManager.ConnectionStrings["CPWDB"] != null)
			{
				dbCpwHelper.Init(ConfigurationManager.ConnectionStrings["CPWDB"].ConnectionString);
				CPWDBAccess.SetDB(dbCpwHelper);
			}


			DALFactory.Init();
		}
		catch(ConfigurationErrorsException e)
		{
			PALogging.Error(PAAccessModule.class, e.getMessage());
			//PALogging.Error(typeof(PAAccessModule), e.InnerException.Message);
			throw e;
		}
		catch(RuntimeException e)
		{
			PALogging.Error(PAAccessModule.class, e.getMessage());
			throw e;
		}*/
	}
}